class PSDroppedPickupFusil extends PSDroppedPickup;

function GotIt(Actor who)
{
	local PSPawnDidrik P;
	local PSInventoryManager im;

	P = PSPawnDidrik(who);

	if(P != none)
	{
		im = PSInventoryManager(P.InvManager);

		// Handle weapon pickup
		if(!im.bGotRifle)
		{
			im.GotRifle();

			// If the player was walking (before getting any weapon), now run
			if(P.CurrentPosture == P.EPosture.POSTURE_Walking)
			{
				P.CurrentPosture = P.EPosture.POSTURE_Running;
				P.GroundSpeed = P.RunningSpeed;
			}

			// If the player had no weapons, equip it
			if(P.CurrentWeapon == P.EWeapon.WEAPON_Unarmed)
			{										
				P.CurrentWeapon = P.EWeapon.WEAPON_Rifle;
				PSPlayerController(P.Controller).CurrentWeaponIndex = 1;
			}				
		}
		// Handle ammo pickup
		else
		{
			PSInventoryManager(P.InvManager).wFusil.GetAmmo(PSInventoryManager(P.InvManager).wFusil.MagMaxAmmo);
			PSInventoryManager(P.InvManager).wFusil.RecalcularVisor();
		}		
			
		PlaySound(SoundCue'PS_sounds.Weapons.sc_pikup_ammo',,,,Location);

		Destroy();
	}
}

DefaultProperties
{
}
